package com.rabboit.config;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@RabbitListener(queues = {"YAN-SHI-QUEUE"})
@Component
public class RabbitMessageListener7 {

    @RabbitHandler
    public void handler(Object msg, Message message, Channel channel){
        System.out.println("===死信==接收消息===="+new String(message.getBody()));
    }

}